package com.xd.spring.liteflow.component;

import cn.hutool.core.util.RandomUtil;
import com.yomahub.liteflow.core.NodeIfComponent;
import com.yomahub.liteflow.core.NodeWhileComponent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component("whileCmp")
@Slf4j
public class WhileCmp extends NodeWhileComponent {


    @Override
    public boolean processWhile() throws Exception {
        int i = RandomUtil.randomInt(0, 5);
        log.info("while i={}", i);
        return i != 3;
    }
}
